<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    手机号码：<input type="number"> <button>发送</button>
    <script>
        var button = document.querySelector('button');

        var time = 5;

        button.addEventListener('click', function () {
            button.disabled = true;

            var times = setInterval(function () {
                if (time != 0) {
                    button.innerHTML = '等待' + time-- + '秒再次发送';

                } else {
                    button.disabled = false;
                    button.innerHTML = '发送';
                    clearInterval(times);   //清楚定时器
                    time = 5;          //从5秒从新开始
                }

            }, 1000)
        })
    </script>
</body>

</html>